import { Response } from "./Response";
import { AsyncCallback } from "@kit.BasicServicesKit";

/**
 *  请求器
 */
export interface Call<T>{

  execute():Promise<Response<T>>

  enqueue(callback:AsyncCallback<Response<T>>)
}
export const DeclareCall:Call<any> = {
  execute: function<T>(): Promise<Response<T>> {
    throw new Error("Function not implemented.");
  },
  enqueue: function<T>(callback: AsyncCallback<Response<T>, void>): void {
    throw new Error("Function not implemented.");
  }
}